home *** CD-ROM | disk | FTP | other *** search
/ UpTime Volume 1 #8 / utv1n8s1.d64 / question maker (.txt) < prev    next >
Commodore BASIC  |  2022-08-28  |  5KB  |  149 lines

  1. 10 gosub 1500
  2. 15 poke 198,0
  3. 20 gety$
  4. 30 ify$="y"then 60
  5. 40 ify$="n"then420
  6. 50 goto20
  7. 60 print"[147]    [209][213][197][211][212][201][207][206] [205][193][203][197][210] is for use with"
  8. 70 print"[195][207][205][208][213][212][197][210] [211][209][213][193][210][197][211].  [215]ith it you can make"
  9. 80 print"your own questions for use in that game."
  10. 100 print"    [217]ou can either write new questions"
  11. 110 print"or edit existing ones.":poke198,0
  12. 120 print"[158]       [208]ress [211][208][193][195][197][194][193][210] to continue"
  13. 130 gets$:ifs$<>" "then130
  14. 140 print"[147]    [212]o write new questions, select '[215]'"
  15. 150 print"at the main prompt.  [217]ou will then be"
  16. 160 print"asked to type in: 50 questions, 50"
  17. 170 print"right answers, 50 wrong answers and 50"
  18. 180 print"funny wrong answers.  [212]he last one is"
  19. 190 print"optional.  [201]f you don't want to put in
  20. 200 [153]"anything funny you should just press
  21. 210 print"return on a blank line.  [193]ll other
  22. 220 [153]"questions must be answered."
  23. 240 [153]"    (NULL)he questions that you make can be"
  24. 250 [153]"up to 2 line lengths long.  atnnything"
  25. 260 [153]"else can only be 1 line length long."
  26. 270 [153]"(NULL)hen you are done you are given the"
  27. 280 [153]"option to review your entries and then"
  28. 290 [153]"you will select a file name to save"
  29. 300 [153]"them under.":[151]198,0
  30. 310 [153]"sys      (NULL)ress (NULL)(NULL)atnlenvalpeekatn(NULL) to continue"
  31. 320 [161]s$:[139]s$[179][177]" "[167]320
  32. 330 [153]"load    (NULL)o edit existing questions, enter"
  33. 340 [153]"'val' at the main prompt.  (NULL)ou will then
  34. 350 print"enter the file name of the questions you";
  35. 360 print"want to edit.  [197]ach question, answer,
  36. 370 [153]"etc., is shown in turn and you are given";
  37. 380 [153]"the chance to change it.
  38. 400 print"    [208][204][197][193][211][197] [206][207][212][197] - [215]hen you get to [198][213][206][206][217]"
  39. 401 print"[215][210][207][206][199] [193][206][211][215][197][210][211], if when you wrote the"
  40. 402 print"file you left this blank a plus sign"
  41. 403 print"(+) will show up here. [212]his is normal"
  42. 404 print"just leave it alone unless you want"
  43. 405 print"to put something here.":poke198,0
  44. 410 print"[158]        [208]ress [211][208][193][195][197][194][193][210] to start"
  45. 411 gets$:ifs$<>" "then411
  46. 420 dima$(200):print"";
  47. 430 print"[147]"tab(13)"[209]uestion [205]aker"
  48. 440 print" [196]o you want to:":print"  [197][155]dit or review a file":qw=0
  49. 450 print"  [215][155]rite a new file":print"  [198]8[155]-[197]xit [209]uestion [205]aker"
  50. 460 print"          [197]nter [158][197],[158] [215] or [158][198]8       ":poke198,0
  51. 470 geta$:ifa$=""then470
  52. 480 ifa$="e"thenqw=1:goto1020
  53. 490 ifa$="[140]"thensys 8*4096+4
  54. 495 if a$<>"w" then 470
  55. 500 aa=0
  56. 510 fora=1to50
  57. 520 print"[147][155][209]uestion "a:print:print
  58. 530 b$="":print"[215]hat is the question?":print">";:gosub2000:b$=t$:ifb$=""then530
  59. 540 a$(aa)=b$:aa=aa+1:print
  60. 550 b$="":print"[158][215]hat is the correct answer?":print">";:gosub2000:b$=t$:ifb$=""then550
  61. 560 a$(aa)=b$:aa=aa+1:print
  62. 570 b$="":print"[215]hat is a wrong answer?":print">";:gosub2000:b$=t$:ifb$=""then570
  63. 580 a$(aa)=b$:aa=aa+1:print
  64. 590 b$="":print"[158][215]hat is a wrong, funny answer?":print">";:gosub2000
  65. 595 b$=t$:ifb$=""thenb$="+"
  66. 600 a$(aa)=b$:aa=aa+1
  67. 610 nexta
  68. 620 print"[147][215]ould you like to review your questions"
  69. 630 printtab(10)"and answers?  ([217]/[206])"
  70. 640 geta$:ifa$=""then640
  71. 650 ifa$="n"andqw=1then430
  72. 660 ifa$="n"then930
  73. 670 aa=0:fora=1to50
  74. 680 print"[147][158][209]uestion "a:print:print
  75. 690 print"[209]uestion:":printa$(aa)
  76. 700 print:print"[158][201]s this correct? ([217]/[206])"
  77. 710 geta$:ifa$=""then710
  78. 730 ifa$="n"then gosub910
  79. 740 aa=aa+1:print"[195]orrect answer:":printa$(aa)
  80. 750 print:print"[158][201]s this correct? ([217]/[206])"
  81. 760 geta$:ifa$=""then760
  82. 770 ifa$="n"then gosub910
  83. 780 aa=aa+1:print"[215]rong answer:":printa$(aa)
  84. 790 print:print"[158][201]s this correct? ([217]/[206])"
  85. 800 geta$:ifa$=""then800
  86. 810 ifa$="n"then gosub910
  87. 820 aa=aa+1:print"[198]unny wrong answer:":printa$(aa)
  88. 830 print:print"[158][201]s this correct? ([217]/[206])"
  89. 840 geta$:ifa$=""then840
  90. 850 ifa$="n"then gosub910
  91. 855 if a$<>"y" then 840
  92. 860 aa=aa+1:next
  93. 870 ifqw=1thenprint"[147][196]o you want to resave this file? ([217]/[206])":poke198,0
  94. 880 geta$
  95. 890 ifa$="y"then930
  96. 895 if a$<>"n" then 880
  97. 900 goto430
  98. 910 print"[158][210]etype the corrected form now.":print">";
  99. 920 gosub2000:a$(aa)=t$:print"[147]";:return
  100. 930 print"[147][208]lease enter a name for this file":print">";:gosub 2000:b$=t$
  101. 940 ifb$=""then930
  102. 950 print"[201]nsert a blank formatted disk or a disk"
  103. 960 print"with at least 20 free blocks into":print"your drive."
  104. 970 print"[158]       [208]ress [211][208][193][195][197][194][193][210] when ready":poke198,0
  105. 980 geta$:ifa$<>" "then980
  106. 985 open 15,8,15,"i0":gosub 2500
  107. 987 if er$>"19" then close 15:goto 985
  108. 990 open2,8,7,"@0:"+b$+",s,w":gosub 2500
  109. 995 if er$>"19" then close 2:close 15:goto 985
  110. 1000 forc=0to200:print#2,a$(c):next
  111. 1010 close2:close15:goto430
  112. 1020 print"[147]":b$=""
  113. 1030 print"  [201]nsert disk with the file on it that"
  114. 1040 print"      you want to review or change"
  115. 1050 print"[197]nter file name":print">";:gosub2000:ift$=""then1050
  116. 1055 open 15,8,15,"i0":gosub 2500
  117. 1057 if er$>"19" then close 15:goto 1055
  118. 1060 open3,8,3,"0:"+t$:gosub 2500
  119. 1065 if er$>"19" then close3:close15:goto 1055
  120. 1070 forb=0to199
  121. 1080 input#3,a$(b):next
  122. 1090 close3:close 15:goto620
  123. 1500 poke53280,0:poke53281,6:print"[147]"tab(13)"[209]uestion [205]aker"
  124. 1510 printtab(5)"[198]or use with [195]omputer [211]quares"
  125. 1520 printtab(9)"(c) 1987 [199]eorge [196]ecker"
  126. 1530 print" [208]ublished by [211]oftdisk [208]ublishing, [201]nc."
  127. 1540 print"    [196]o you need instructions? ([217]/[206])"
  128. 1550 return
  129. 2000 t$="":print"[164]";
  130. 2010 get a$:if a$="" then 2010
  131. 2020 a%=asc(a$)
  132. 2025 if a%=140 then sys 8*4096+4
  133. 2030 if a%=13 then print"[157] ":return
  134. 2040 if a%=20 and t$="" then 2010
  135. 2050 if a%=20 then t$=left$(t$,len(t$)-1):print"[157][157]  [157][157][164]";:goto 2010
  136. 2060 if a%=34 then 2010
  137. 2070 if a%<32 or a%>218 then 2010
  138. 2080 if a%>90 and a%<193 then 2010
  139. 2085 if len(t$)=36 then 2010
  140. 2090 print"[157] [157]"a$"[164]";
  141. 2100 t$=t$+a$
  142. 2110 goto 2010
  143. 2500 input#15,er$,em$,et$,es$
  144. 2510 if er$<"20" then return
  145. 2520 print"[147] [196]isk error!: "er$", "em$","et$","es$
  146. 2530 printtab(8)"[208]ress [210]eturn to continue"
  147. 2540 get a$:if a$<>chr$(13) then 2540
  148. 2550 return
  149.